@import "./variables.scss";
@import "./mixin.scss";
@import "./transition.scss";
@import "./element-ui.scss";
@import "./sidebar.scss";

body {
  height: 100%;
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB,
    Microsoft YaHei, Arial, sans-serif;
}

label {
  font-weight: 700;
}

html {
  height: 100%;
  box-sizing: border-box;
}

#app {
  height: 100%;
}

*,
*:before,
*:after {
  box-sizing: inherit;
}

a:focus,
a:active {
  outline: none;
}

a,
a:focus,
a:hover {
  cursor: pointer;
  color: inherit;
  text-decoration: none;
}

div:focus {
  outline: none;
}

.clearfix {
  &:after {
    visibility: hidden;
    display: block;
    font-size: 0;
    content: " ";
    clear: both;
    height: 0;
  }
}

// main-container global css
.app-container {
  padding: 20px;
}
.operation-wrap {
  button + span {
    margin-left: 10px !important;
  }
  button{
    margin-bottom: 10px;
  }
}
* {
  margin: 0;
  padding: 0;
}
.flex {
  display: flex;
  flex-shrink: 0;
}
.flex-1 {
  flex: 1;
  flex-shrink: 0;
}
.shrink-0 {
  flex-shrink: 0;
}
.flex-wrap {
  @extend .flex;
  flex-wrap: wrap;
}
.flex-column {
  @extend .flex;
  flex-direction: column;
}
.flex-center {
  @extend .flex;
  justify-content: center;
  align-items: center;
}
.ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.border-box {
  box-sizing: border-box;
}
.bold {
  font-weight: bold;
}
.width-100 {
  width: 100%;
}
@each $jcKey, $jcVal in $flex-jc {
  .jc-#{$jcKey} {
    @extend .flex;
    justify-content: $jcVal;
  }
}
@each $aiKey, $aiVal in $flex-ai {
  .ai-#{$aiKey} {
    @extend .flex;
    align-items: $aiVal;
  }
}
//through:右闭区间，包含最后一项
//to:右开区间，不包含最后一项
@for $index from 6 through 20 {
  .font-#{$index*2} {
    font-size: #{$index * 2}px;
  }
}
@each $key, $value in $colors {
  .color-#{$key} {
    color: #{$value};
  }
}
@each $typeKey, $typeVal in $space-types {
  @for $index from 1 through 24 {
    @each $dirKey, $dirVal in $space-dirs {
      .#{$typeKey}#{$dirKey}-#{$index*2} {
        #{$typeVal}-#{$dirVal}: $index * 2px;
      }
    }
    .#{$typeKey}-#{$index*2} {
      #{$typeVal}: $index * 2px;
    }
  }
}
@each $key, $value in $colors {
  .bg-#{$key} {
    background-color: #{$value};
  }
}

@mixin bgFormat {
  background-repeat: no-repeat;
  background-size: cover;
  background-position-y: bottom;
}
